<?php
    $table = $this->inflect($this->table)->toPhrase(Mz_Inflector::UC_FIRST);
    $this->headTitle($table . '::Read');
    $this->headLink(array(
        'rel' => 'stylesheet',
        'media' => 'screen',
        'href' => $this->resource('css/crud.css'),
    ));
?>
<?php if (!$this->layout()->getMvcInstance() || !$this->layout()->isEnabled()) echo $this->render('_partials/head.phtml'); ?>

<div id="crud-nav">
    <a href="<?php echo $this->url(array('action' => 'list', 'id' => null)) ?>">
        Return to record list
    </a>
    <a href="<?php echo $this->url(array('action' => 'create', 'id' => null)) ?>">
        New <?php echo $this->inflect($table)->singularize() ?>
    </a>
    <a href="<?php echo $this->url(array('action' => 'index', 'controller' => 'index', 'module' => 'crud'), null, true) ?>">
        Return to table list
    </a>
</div>

<?php if (!empty($this->messages)) : ?>
<div id="crud-messages">
    <p>
    <?php echo implode("</p>\n<p>", $this->messages); ?>
    </p>
</div>
<?php endif; ?>

<div class="crud-box">
    <div class="crud-box-head"><h4>Showing <?php echo $this->inflect($table)->singularize() ?> details</h4></div>
    <div class="crud-box-body clearfix">

<form action="<?php echo $this->url() ?>" method="post">
    <ul class="list-form">
<?php foreach ($this->data as $label=>$value) : ?>
    	<li>
            <span class="label"><?php echo $this->inflect($label)->toPhrase(Mz_Inflector::UC_FIRST) ?></span>
            <div class="value"><?php echo $value ?></div>
    	</li>
<?php endforeach ?>
        <li class="actions">
            <input type="submit" name="edit" value="Edit" />
            <input type="submit" name="delete" value="Delete" />
        </li>
    </ul>
</form>

    </div>
</div>
<!-- View: $Id -->

<?php if (!$this->layout()->getMvcInstance() || !$this->layout()->isEnabled()) echo $this->render('_partials/foot.phtml'); ?>